package com.mf.repository;

import com.mf.entity.GoodsPic;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * 商品图片Reposiroty接口
 *
 * @author: Jiang Runqing
 * @date: 2018-09-03 20:48
 */
public interface GoodsPicRepository extends JpaRepository<GoodsPic, Integer>, JpaSpecificationExecutor<GoodsPic> {

    @Query(value = "select * from t_goods_pic where goods_id =?1", nativeQuery = true)
    public List<GoodsPic> findByGoodsId(int goodsId);
}
